home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 2 (DVD) / XENIADVD2.iso / Demo / Delta Force Black Hawk Down / DATA1.CAB / Program_Executable_Files / demores.pff / SPBHD_13.wac < prev    next >
Encoding:
Text File  |  2002-12-12  |  6.9 KB  |  179 lines

  1. ;wac file - nestable IF/THEN/ELSE/ENDIF boolean logic
  2. ;
  3. ;WAC post directory w:\vp\program\wac - commands listed in GAME.WAC
  4. ;WAC debug screen under shift-F12, numlock arrows to select and scroll
  5. ;
  6. ;GLOBAL WAC is GAME.WAC (executed first)
  7. ;
  8. ;MISSION WAC is misname.WAC (executed second)
  9. ;
  10. ;Left to Right order of operations
  11. ;
  12. ;---WAC LANGUAGE COMMANDS
  13. ;nestable flow control
  14. ;       IF THEN ELSE ENDIF
  15. ;boolean logic
  16. ;       AND OR XOR
  17. ;function modifier
  18. ;       NOT
  19. ;comments
  20. ;       ; /
  21. ;
  22. ;Syntax - parens optional, line returns and tabbing optional
  23. ;
  24. ;       if trigger1(params) and trigger2(params) then
  25. ;               event1(params)
  26. ;               event2(params)
  27. ;       endif
  28. ;
  29. ;Example
  30. ;
  31. ;   I want to open doors in group 12 the first time I enter area 1501
  32. ;
  33. ;       if location(1501) and never() then
  34. ;               opendoors(12)
  35. ;       endif
  36. ;
  37.  
  38. ;---VARIABLES & IMMEDIATES (a variable can always be used as an immediate)
  39. ;"STRING"       immediate string value
  40. ;#              immediate decimal number
  41. ;anim_move      immediate equate from ADM file
  42. ;ammo_name      immediate ammo name (ex. ammo2tgt ammo_rocket 1)
  43. ;fx_fxname      immediate effect name (ex. fxrain fx_effect_lightning)
  44. ;effect_name    immediate effect name (ex. fxrain effect_lightning)
  45. ;SS_SoundSet    immediate soundset name
  46. ;sSoundSet      immediate soundset name (alternate syntax)
  47. ;V#             V0 to v511 game variables, cleared at start of mission
  48. ;G#             G0 to vG11 global variables, not cleared during link
  49. ;M#             Music Script Variable
  50. ;result         current return/accumulator value (mostly for debug)
  51. ;ticks          number of seconds into game
  52. ;wind           used by SWING, FLICKER, and particle wind2
  53. ;health         player's health/hp value
  54. ;mana           player's mana
  55. ;neartype       the type of the nearest enemy (from items.def dialog)
  56. ;neardist       the distance to the nearest organic
  57. ;nearmove       the anim move of the nearest organic (setable)
  58. ;nearid         the unique dcb/id of the nearest organic
  59. ;neartid        the id of the organic's target or 0 if no target
  60. ;nearblind
  61. ;nearflying
  62. ;nearguard
  63. ;nearSSN
  64. ;nearWP
  65. ;nearGroup
  66. ;nearHP
  67.  
  68. ;---TRIGGERS (# param can be number or variable)
  69. ;random(#)      randomly true 1 in # times
  70. ;elapse(#)      true if # seconds have past since last activated
  71. ;chain(#)       true if previous IF fired # seconds ago
  72. ;link(#1,#2)    true if IF #1 away from current IF fired #2 seconds ago
  73. ;                       link(-1,10) is same as chain(10)
  74. ;past(#)        true if past # seconds into game
  75. ;never()        true if event has never fired
  76. ;location(#)    true if you are at that location
  77. ;outside()      true if you are not in a blink box
  78. ;waveready()    true if no talking going on
  79. ;groupdead(#)   true if entire group is dead
  80. ;groupalive(#)  true if anyone in group is alive
  81. ;ssndead(#)     true if ssn is dead
  82. ;ssnalive(#)    true if ssn is alive
  83. ;ssnride(#)     true if organic is standing on SSN
  84. ;ssnloc(#,#)    true if vehical or person is in location
  85. ;dooropen(#)    true if group # has door open
  86. ;
  87. ;---VARIABLE COMPARE
  88. ;eq(#,#)        true if #==#
  89. ;ne(#,#)        true if #!=#
  90. ;lt(#,#)        true if #<#
  91. ;gt(#,#)        true if #>#
  92. ;le(#,#)        true if #<=#
  93. ;ge(#,#)        true if #>=#
  94. ;true(#)        true if #!=0
  95. ;false(#)       true if #==0
  96. ;
  97. ;---VARIABLE MODIFY
  98. ;set(var,#)             set var to #
  99. ;add(var,#)             add # to var
  100. ;sub(var,#)             subtract # from var, clamp at 0
  101. ;inc(var)               add 1 to var
  102. ;dec(var)               subtract 1 from var, clamp at 0
  103.  
  104. ;---EVENTS (# param can be number or variable)
  105. ;forceanim(anim)        forces all organics into anim slot (debug only)
  106. ;report("text")         pop-up debug report window
  107. ;report#("text",#)      pop-up debug report window with number
  108. ;text("text")           output text to chat - right side
  109. ;text#("text",#)        output text to chat w/# - right side
  110. ;consol("text")         output text to consol - left side
  111. ;consol#("text",#)      output text to consol w/# - left side
  112. ;
  113. ;flash                  produce a flash of lightning & thunder
  114. ;farflash               produce a far away flash of lightning & thunder
  115. ;quake(#)               earthquake for # 10th of a seconds
  116. ;
  117. ;sun(#,#,#)             sets sun rgb    ENV override
  118. ;sky(#,#,#)             sets sky rgb
  119. ;ground(#,#,#)          sets ground rgb
  120. ;ceiling(#,#,#)         sets ceiling rgb
  121. ;floor(#,#,#)           sets floor rgb (inside ground)
  122. ;lightning(#,#,#)       sets the color of the lightning
  123. ;cloud(#,#,#)           sets the cloud color
  124. ;gain(#,#,#)            sets the brightness of the whole scene
  125. ;
  126. ;fogcolor(#,#,#)        set fogcolor to R,G,B, changes in 1 second
  127. ;fog(#,#,#)             set fogcolor to R,G,B (same as fogcolor)
  128. ;fogtype(#)             set fog type 0=fog, 1=haze, 2=haze wall, 3=fog wall
  129. ;fogdist(#)             sets fogdist to # meters (same as set(fog,#)
  130. ;
  131. ;sound(sSSNAME, dist, head)  plays soundset at distance(meters) and heading(bangle)
  132. ;
  133. ;nearwave("wave.wav", dist) plays wave file from the mouth of the nearest enemy with max dist to be heard
  134. ;nearanim(anim_move)    sets the nearest enemy to ADM move slot
  135. ;SSNwave(ssn, "wave.wav", dist) plays wave file from the mouth of the ssn with max dist to be heard
  136. ;SSNanim(ssn, anim_move)    sets the ssn to ADM move slot
  137. ;
  138. ;SSNmax(ssn, maxengage) set max engage
  139. ;SSNmin(ssn, minengage) set min engage
  140. ;SSNatt(ssn, maxattack) set max engage
  141. ;GroupMax(group, maxengage) set max engage
  142. ;GroupMin(group, minengage) set min engage
  143. ;GroupAtt(group, maxattack) set max engage
  144. ;remove(grp)            remove group # without a trace
  145. ;kill(grp)              kill group #
  146. ;removeSSN(ssn)         remove SSN # without a trace
  147. ;killSSN(ssn)           kill SSN #
  148. ;teleport(grp,tgt)      teleport group # to target #
  149. ;telessn(ssn, tgt)      teleport SSN # to target #
  150. ;targetfx(tgt)          create med particle fx at target #
  151. ;sound2tgt(ss,tgt)      create ssoundset # at target # (ex. sound2tgt sSoundSet 1)
  152. ;ammo2tgt(ammo,tgt)     create ammo # at target # (ex. ammo2tgt ammo_rocket 1)
  153. ;fx2tgt(fx,tgt)         create fx # at target # (ex. fx2tgt effect_lightning 1)
  154. ;opendoors(group)       open doors in group #
  155. ;closedoors(group)      close doors in group #
  156. ;SSNtoWP(ssn, wp)       redirect SSN to WP list
  157. ;GtoWP(group, wp)       redirect Group to WP list
  158. ;ammorain(ammo)         rain down ammo # somewhere near player
  159. ;fxrain(fx)             rain down effect # somewhere near player
  160. ;ssncspd(ssn,speed)     set ssn to combat speed of #
  161. ;ssnpspd(ssn,speed)     set ssn to patrol speed of #
  162.  
  163. ;*********************************************************
  164.  
  165. if location 2 and never then
  166.     set(V1,1)
  167. endif
  168. if location 6 and never and previous then
  169.     set (V2,1)
  170. endif
  171. if eq (V1,1) and eq (V2,1) and never and location 2 then
  172.     killSSN (5564)
  173. endif
  174.  
  175. ;*******************************************************
  176.  
  177. if never then
  178.     fogdist(750)
  179. endif